package com.bw.a2209clubshop.ui.mall.reposiitory

import androidx.lifecycle.MutableLiveData
import com.bawei.a2209_mianshi.ui.mall.model.AdInfoModel
import com.bw.a2209clubshop.http.ClubService
import com.bw.a2209clubshop.ui.mall.model.MallGoods
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

/**
 * @author yaotianxue
 * @description
 * @date 2025/5/12
 */
class MallRepository  @Inject constructor(private val clubService: ClubService){

//     fun cmallAdInfo() = flow {
//         emit(clubService.cmallAdInfo())
//     }.flowOn(Dispatchers.IO)
     fun getMallData() = flow {
         emit(clubService.getMallData())
     }.flowOn(Dispatchers.IO)
      fun getMallBanner() = flow {
         emit(clubService.getMallBanner())
     }.flowOn(Dispatchers.IO)
     fun getMallCate() = flow {
         emit(clubService.getMallCate())
     }.flowOn(Dispatchers.IO)
     fun getGoodsDetail() = flow {
         emit(clubService.getGoodsDetail())
     }.flowOn(Dispatchers.IO)
}